﻿@using System.Text
@model List<KhatVongViet.Models.Article>
<script type="text/javascript" class="secret-source">
    jQuery(document).ready(function ($) {

        $('#banner-fade').bjqs({
            height: 400,
            width: 705,
            responsive: true,
            showmarkers: false
        });

    });
</script>
<div id="banner-fade" style="-ms-box-shadow: 0 0 10px #ccc; -webkit-box-shadow: 0 0 10px #ccc;
    box-shadow: 0 0 10px #ccc; margin-left: 20px; margin-top: 10px;">
    <ul class="bjqs">
        @foreach (var item in Model)
        {
            var stringBuilder = new StringBuilder();
            stringBuilder.Append("<span style='font-weight:bold;font-size:20px;color:yellow'>");
            stringBuilder.Append(item.Title);
            stringBuilder.Append("</span>");
            stringBuilder.Append("<br/>");
            if (item.Summary.Length > 225)
            {
                stringBuilder.Append(item.Summary.Substring(0, item.Summary.Substring(0, 225).LastIndexOf(" ", System.StringComparison.Ordinal)));
                stringBuilder.Append(" ...");
            }
            else
            {
                stringBuilder.Append(item.Summary);
            }

            <li>
                <img src="@item.Image" title="@stringBuilder" link="/Home/DetailArticle?idArticle=@item.ID" alt="">
            </li>
        }
    </ul>
</div>
